<?php
require_once 'Zend/View/Helper/FormElement.php';

class Core_View_Helper_FormHeading extends Zend_View_Helper_FormElement
{
    public function formHeading($name, $value, $attribs = null)
    {
        $info = $this->_getInfo($name, $value, $attribs);
        extract($info); // name, value, attribs, options, listsep, disable
 
        $level = $attribs['level'];
        unset($attribs['level']);
        $level = 'h' . $this->view->escape($level);
 
        $xHtml = '<' . $level
                 . ' id="' . $this->view->escape($id) . '"'
                 . $this->_htmlAttribs($attribs)
                 . '>'
                 . $this->_translator->translate($value)
                 . "</$level>";
 
        return $xHtml;
    }
}